﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GeneralServices.Model
{
    /// <summary>
    /// Interface UnitOfWork permettant de commiter les modifications en base
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IUnitOfWork<T> : IDisposable 
        where T : class
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        int Commit();

        /// <summary>
        /// 
        /// </summary>
        void RollBackAll();

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        void RollBack(T entity);

    }
}
